A fool's errand is an impossible, pointless task. If someone at your new job instructs you to bring them a left-handed pencil, they're a practical joker sending you on a fool's errand!
A fool's errand can be an accidental wasted effort, like spending 20 minutes searching for a gray sedan in a dark parking lot full of gray cars. It can also be a deliberate practical joke, like sending someone to the store to buy dehydrated water. First used in 18th-century England, an earlier phrase was sleeveless errand, from a colloquial meaning of sleeveless, "futile."